<div class="action-dialog-model-fixed-body">
    <div class="detailsBox">
        <h3>客户门店信息</h3>
        <form action="<@url value='/customer/shop/rest/updatenew'/>" method="post" name="shopForm" class="action-ajax-form action-ajax-form-valid" >
            <div class="detaiTab">
            <input id="customerShopId" type="hidden" value="${view.customerShopId}" name="customerShopId">
                <input id="loanapplyNo" type="hidden" value="${o2oLoanapplyEntity.loanapplyNo}" name="loanapplyNo">
                 <input id="islock" type="hidden" value="${view.islock}" name="islock">
                  <input id="creator" type="hidden" value="${view.creator}" name="creator" >
                <input id="createDate" type="hidden" value="${view.createDate}" name="createDate" >
                <input id="createId" type="hidden" value="${view.createId}" name="createId" >
                <table width="100%" cellspacing="0" cellpadding="0" border="0">
                    <tbody>
                    <tr>
                    	
                        <td width="15%" align="right" class="bg"> 产权性质：<font color="red">*</font></td>
						<td colspan="3">
                            <@select dataSouceType="PROPERTYTYPE"  value="${view.propertytype}" name="propertytype"   class="action-valid-field" data\-action\-valid\-rule="required;" data\-action\-valid\-msg\-required="产权性质不能为空！"/>
                            <span class="action-field-error" for="propertytype" style="color:red;"></span>
                        </td>	
						</tr>
						<tr>
                        <td width="15%" align="right" class="bg">门店经营环境描述：<font color="red">*</font></td>
                        <td colspan="3">
							<textarea rows="4" cols="60" id="manageps" name="manageps">${view.manageps}</textarea>
                        </td>
                    </tr>
                    <tr>
                        
                        <td width="15%" align="right" class="bg">门店电话：<font color="red">*</font></td>
                        <td >
                            <input type="text"  id="telephone" size="30" name="telephone" value="${view.telephone}"  class="action-valid-field" data-action-valid-rule="required;maxlength:30;" data-action-valid-msg-required="门店电话不能为空！"  autocomplete="off"/>
                            <span class="action-field-error" for="telephone" style="color:red;"></span>
                        </td>
                        <td width="15%" align="right" class="bg">门店成立日期：<font color="red">*</font></td>
                        <td >

                        <@date id="stupdate" name="stupdate" value="${view.stupdate}" class="action-valid-field" data\-action\-valid\-rule="required;" data\-action\-valid\-msg\-required="门店成立日期不能为空！" />
                            <span class="action-field-error" for="stupdate" style="color:red;"></span>
                        </td>
                    </tr>
                    <tr>
                        <td width="15%" align="right" class="bg">门店地址：<font color="red">*</font></td>
                        <td colspan='3'><@select dataSouceType="province" value="${view.shopprovince}" name="shopprovince"  id="select_shop_provinceId" value="${view.shopprovince}" onchange="shopprovinceOnchange()" />
                            &nbsp;&nbsp; <@select dataSouceType="city" value="${view.shopcity}" name="shopcity"  id="select_shop_cityId" value="${view.shopcity}" onchange="shopcityOnchange()" />
                            &nbsp;&nbsp; <@select dataSouceType="country" value="${view.shopcounty}" name="shopcounty"  id="select_shop_districtId" value="${view.shopcounty}"/>
                            &nbsp;&nbsp; <input type="text"  id="shopaddress" value="${view.shopaddress}" size="50" name="shopaddress" class="action-valid-field" data-action-valid-rule="required;maxlength:50;" data-action-valid-msg-required="门店地址不能为空！"  autocomplete="off" />
                            <span class="action-field-error" for="shopaddress" style="color:red;"></span>
                        </td>
                    </tr>


                    <tr>
                        <td width="15%" align="right" class="bg">营业面积/平方米：<font color="red">*</font></td>
                        <td>
                            <input type="text"  id="businessarea"  size="30" value="${view.businessarea}" name="businessarea"  class="action-valid-field" data-action-valid-rule="required;maxlength:10;reg:^\d+(.\d{1,2})?$;" data-action-valid-msg-required="营业面积不能为空！"  autocomplete="off" /> 平方米
                            <span class="action-field-error" for="businessarea" style="color:red;"></span>
                        </td>
                        <td width="15%" align="right" class="bg">年租金（元）：<font color="red">*</font></td>
                        <td>
                         <input type="text"  id="shoprentyear"  size="30" name="shoprentyear" value="${view.shoprentyear}" class="action-valid-field" data-action-valid-rule="required;maxlength:12;reg:^\d+(.\d{1,2})?$;" data-action-valid-msg-required="年租金不能为空！"  autocomplete="off" />
                            <span class="action-field-error" for="shoprentyear" style="color:red;"></span>
                        </td>
                    </tr>
                    
                    <tr>
                        <td width="15%" align="right" class="bg">租赁合同起止日期：<font color="red">*</font></td>
                        <td>
                            <@date id="shoprentstart" name="shoprentstart" value="${view.shoprentstart}" class="action-valid-field" data\-action\-valid\-rule="required;" data\-action\-valid\-msg\-required="租赁合同起不能日期为空！" />
                            <span class="action-field-error" for="shoprentstart" style="color:red;"></span>--
                            <@date id="shoprentend" name="shoprentend" value="${view.shoprentend}" class="action-valid-field" data\-action\-valid\-rule="required;" data\-action\-valid\-msg\-required="租赁合同止日期为空！" />
                            <span class="action-field-error" for="shoprentend" style="color:red;"></span>
                        </td>
                        <td width="15%" align="right" class="bg">存货价值预估（元）：<font color="red">*</font></td>
                        <td>
                            <input type="text"  id="storeinvamount" value="${view.storeinvamount}" size="30" name="storeinvamount" class="action-valid-field" data-action-valid-rule="required;maxlength:12;reg:^\d+(.\d{1,2})?$;" data-action-valid-msg-required="存货价值预估不能为空！"  autocomplete="off" /> 
                            <span class="action-field-error" for="storeinvamount" style="color:red;"></span>
                        </td>
                    </tr>
                    
                    <tr>
                        <td width="15%" align="right" class="bg">装修新旧程度：<font color="red">*</font></td>
                        <td>
                            <@select dataSouceType="RENOVATIONOLDNEW" name="newtype" value="${view.newtype}" class="action-valid-field" data\-action\-valid\-rule="required;" data\-action\-valid\-msg\-required="装修新旧程度不能为空！" />
                            <span class="action-field-error" for="newtype" style="color:red;"></span>
                        </td>
                        
                        <td width="15%" align="right" class="bg">货架是否整齐：<font color="red">*</font></td>
                        <td>
                        <@select dataSouceType="STORAGETYPE" name="istype" value="${view.istype}" class="action-valid-field" data\-action\-valid\-rule="required;" data\-action\-valid\-msg\-required="货架是否整齐不能为空！" />
                            <span class="action-field-error" for="istype" style="color:red;"></span>
                        </td>
                    </tr>
                    <tr>
                       <td width="15%" align="right" class="bg">存货效期描述：<font color="red">*</font></td>
                        <td colspan="3">
							<textarea rows="4" cols="60" id="stockps" name="stockps">${view.stockps}</textarea>
                        </td>
                    </tr>

                 

                 
                   
                   
                  
                    </tbody>
                </table>
            </div>
           
          

            <div class="clearfix tac mtb20">
                <input type="submit" class="btn_auto_30 btn_blue" value="提交">&nbsp;
                <!--<a class="btn_auto_30 btn_blue ml20" href="/customer/getCustomerDetailInfo?op_type=show&customer_id=${vo.customer_id}" target="_self">返回</a>-->
            </div>
        </form>



	
    </div>

    <div>
	
  <@js>



        function shopprovinceOnchange(){
        var provinceCode = $("#select_shop_provinceId").val();
        var url="<@url value='/common/findCityByProvinceCode' domain='${crmUrl}'/>";
        $.ajax({
        type: "GET",
        url:url,
        data:{provinceCode:provinceCode},
        dataType:"jsonp",
        jsonp:"_callback",
        success:function(result){
   var t = $("#select_shop_cityId").find("option:selected").text();
        $("#select_shop_cityId").empty();
        $("#select_shop_cityId").append("<option value=''>请选择</option>");

        $.each(result.data,function(key,value){
   if(t==value[1]){
   $("#select_shop_cityId").append("<option selected = 'selected' value='"+value[0]+"'>"+value[1]+"</option>");
   }else{
   $("#select_shop_cityId").append("<option value='"+value[0]+"'>"+value[1]+"</option>");
   }
        });
        }
        });
   shopcityOnchange();
        }


        function shopcityOnchange(){
        var cityCode = $("#select_shop_cityId").val();
        var url="<@url value='/common/findDistrictByCityCode' domain='${crmUrl}'/>";
        $.ajax({
        type: "GET",
        url:url,
        data:{cityCode:cityCode},
        dataType:"jsonp",
        jsonp:"_callback",
        success:function(result){
   var t = $("#select_shop_districtId").find("option:selected").text();
        $("#select_shop_districtId").empty();
        $("#select_shop_districtId").append("<option value=''>请选择</option>");

        $.each(result.data,function(key,value){
   if(t==value[1]){
   $("#select_shop_districtId").append("<option selected = 'selected' value='"+value[0]+"'>"+value[1]+"</option>");
   }else{
   $("#select_shop_districtId").append("<option value='"+value[0]+"'>"+value[1]+"</option>");
   }
        });
        }
        });
        }

      
    </@js>
    <@jsRender/>
	
 
		
